import axios from '@assets/request/index';
import { InjectionKey } from 'vue'
import {useStore,Store} from 'vuex'

//发布商品
export function Append(data:object,token:string):object{
	return axios.post('/sets/append', data,token)
}
//编辑修改商品
export function Edit(data:object,token:string):object{
	return axios.post('/sets/modify', data,token)
}
//下架商品
export function Drop(data:object,token:string):object{
	return axios.post('/sets/drop', data,token)
}
//获取页面数据
export  function getData(token:string):object{
	return new Promise(async (resolve:Function,reject:Function)=>{
	var data= await axios({
		url:'/getdata',
		headers: {
		      'x-token-shitian':token
		}
	})
		// store.commit('setPageData',data)
		resolve(data)
	})
}